//This code was created with the help of Cairngorm Creator by Tyler Beck.
//The portions of this document created by Cairngorm Creator 
//are provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR 
//CONDITIONS OF ANY KIND, either express or implied.
//========================================================



package net.optix.ip.control
{
	import com.adobe.cairngorm.control.FrontController;
	
	import net.optix.ip.commands.*;
	import net.optix.ip.events.*;


	public class Controller extends FrontController
	{
		//-----------------------------------------------------------
		public function Controller():void
		{
			initializeCommands();
		}

		//-----------------------------------------------------------
		public function initializeCommands():void
		{
			/**
			 * 	user event and command
			 * 
			*/
			//addCommand( Controller.Event_CheckLogin, CheckLoginCommand);
			addCommand( Controller.Event_ClientRegister, ClientRegisterCommand );
			addCommand( Controller.Event_PractitionerRegister, PractitionerRegisterCommand );
			addCommand( Controller.Event_UserLogin,UserLoginCommand);
			addCommand( Controller.Event_GetUser , GetUserCommand );
			addCommand( Controller.Event_EditPersonalInformation , EditPersonalInformationCommand );
			addCommand( Controller.Event_ChangePassword , ChangePasswordCommand );
			addCommand( Controller.Event_LogOut , LogOutCommand );
			addCommand( Controller.Event_EditBilling , EditBillingCommand );
			addCommand( Controller.Event_AddInventor , AddInventorCommand );
			addCommand( Controller.Event_EditFirm , EditFirmCommand );
			addCommand( Controller.Event_AddClient , AddClientCommand );
			addCommand( Controller.Event_AddPractitioner , AddPractitionerCommand );
			addCommand( Controller.Event_GetPractitioners , GetPractitionersCommand );
			addCommand( Controller.Event_UpdatePractitioner , UpdatePractitionerCommand );
			addCommand( Controller.Event_DeletePractitioner , DeletePractitionerCommand );
			addCommand( Controller.Event_GetPractitioner , GetPractitionerCommand );
			addCommand( Controller.Event_GetInventors , GetInventorsCommand );
			addCommand( Controller.Event_GetInventor , GetInventorCommand );
			addCommand( Controller.Event_UpdateInventor , UpdateInventorCommand );
			addCommand( Controller.Event_DeleteInventor , DeleteInventorCommand );
			addCommand( Controller.Event_GetClients , GetClientsCommand );
			addCommand( Controller.Event_UpdateClient , UpdateClientCommand );
			addCommand( Controller.Event_DeleteClient , DeleteClientCommand );
			addCommand( Controller.Event_GetClient , GetClientCommand );
			addCommand( Controller.Event_GetFirms , GetFirmsCommand );
			addCommand( Controller.Event_UpdateFirms , UpdateFirmsCommand );
			addCommand( Controller.Event_DeleteFirm ,DeleteFirmCommand );
			addCommand( Controller.Event_GetFirm , GetFirmCommand );
			
			
			addCommand( Controller.Event_GetInventions , GetInventionsCommand );
			addCommand( Controller.Event_GetInvention , GetInventionCommand );
			addCommand( Controller.Event_GetActions , GetActionsCommand );
			addCommand( Controller.Event_AddInvention , AddInventionCommand);
			addCommand( Controller.Event_AddAction , AddActionCommand );
			addCommand( Controller.Event_RequestBid , RequestBidCommand );
			addCommand( Controller.Event_UpdateInvention , UpdateInventionCommand );
			addCommand( Controller.Event_PublishInvention , PublishInventionCommand );
			addCommand( Controller.Event_GetBidInventions , GetBidInventionsCommand );
			addCommand( Controller.Event_SetBudget , SetBudgetCommand );
			addCommand( Controller.Event_GetValue , GetValueCommand );
			addCommand( Controller.Event_SetValue , SetValueCommand );
			addCommand( Controller.Event_GetInventionBudgets , GetInventionBudgetsCommand );
			addCommand( Controller.Event_AssignToFirm , AssignToFirmCommand );
			addCommand( Controller.Event_AssignToFirmOther , AssignToFirmOtherCommand );
			addCommand( Controller.Event_AcceptAssignInvention , AcceptAssignInventionCommand );
			addCommand( Controller.Event_RenewalFee , RenewalFeeCommand );
			addCommand( Controller.Event_AddFieldAction , AddFieldActionCommand );
			addCommand( Controller.Event_AddOfficeAction , AddOfficeActionCommand );
			addCommand( Controller.Event_AssignToPractitioner , AssignToPractitionerCommand );
			addCommand( Controller.Event_GetFirmsWork , GetFirmsWorkCommand );
			addCommand( Controller.Event_GetTrackInventions , GetTrackInventionsCommand );
			addCommand( Controller.Event_GetTrackInventionsByFirm , GetTrackInventionsByFirmCommand );
			addCommand( Controller.Event_RecordTradeMark , RecordTradeMarkCommand );
			addCommand( Controller.Event_RecordTradeSecret , RecordTradeSecretCommand );
			addCommand( Controller.Event_SetMaxBudget , SetMaxBudgetCommand );
			addCommand( Controller.Event_SaveFirmDocket , SaveFirmDocketCommand );
			//addCommand( Controller.Event_GetTrades , GetTradesCommand );
			
			addCommand( Controller.Event_GetTradeSecrets , GetTradeSecretsCommand );
			addCommand( Controller.Event_ResponseToOffice , ResponseToOfficeCommand );
			addCommand( Controller.Event_GetResponseActions , GetResponseActionsCommand );
			addCommand( Controller.Event_ProtectAsSecret , ProtectAsSecretCommand );
			
			
			/**
			 * trade mark
			 */
			addCommand( Controller.Event_GetTradeMarks , GetTradeMarksCommand );
			addCommand( Controller.Event_GetBidTradeMarks , GetBidTradeMarksCommand );
			addCommand( Controller.Event_GetTradeMark , GetTradeMarkCommand );
			addCommand( Controller.Event_GetTradeMarkActions , GetTradeMarkActionsCommand );
			addCommand( Controller.Event_AssignTradeMarkToFirm , AssignTradeMarkToFirmCommand );
			addCommand( Controller.Event_AcceptAssignMark , AcceptAssignMarkCommand );
			addCommand( Controller.Event_AddTradeMarkAction , AddTradeMarkActionCommand );
			
			/**
			 * copy right
			 */
			addCommand( Controller.Event_GetCopyrights , GetCopyrightsCommand );
			addCommand( Controller.Event_GetBidCopyrights , GetBidCopyrightsCommand );
			addCommand( Controller.Event_GetCopyright , GetCopyrightCommand );
			addCommand( Controller.Event_SetCopyright , SetCopyrightCommand );
			addCommand( Controller.Event_AssignCopyrightToFirm , AssignCopyrightToFirmCommand );
			addCommand( Controller.Event_GetCopyrightActions , GetCopyrightActionsCommand );
			addCommand( Controller.Event_AddCopyrightAction , AddCopyrightActionCommand );
			addCommand( Controller.Event_AcceptAssignCopyright , AcceptAssignCopyrightCommand );
			/**
			 * budget
			 */
			addCommand( Controller.Event_GetBudgets , GetBudgetsCommand );
			
			/**
			 * manager
			 */
			addCommand( Controller.Event_GetOrderFirms , GetOrderFirmsCommand );
			addCommand( Controller.Event_ReturnCase , ReturnCaseCommand );
			addCommand( Controller.Event_UpdateService , UpdateServiceCommand );
		}

		/**
		 * user
		 */
		public static const Event_ClientRegister:String 			= 	"ClientRegisterEvent";
		public static const Event_PractitionerRegister:String 		= 	"PractitionerRegisterEvent";
		public static const Event_UserLogin:String					=	"UserLoginEvent";
		public static const Event_GetUser:String					=	"GetUserEvent";
		public static const Event_LogOut:String						=	"LogOut";
		public static const Event_EditPersonalInformation :String 	= 	"EditPersonalInformationEvent";
		public static const Event_ChangePassword : String 			= 	"ChangePasswordEvent";
		public static const Event_EditBilling:String				=	"EditBillingEvent";
		public static const Event_AddInventor:String 				= 	"AddInventorEvent";
		public static const Event_EditFirm : String 				= 	"EditFirmEvent";
		public static const Event_AddClient:String					=	"AddClientEvent";
		public static const Event_AddPractitioner:String			=	"AddPractitionerEvent";
		public static const Event_GetPractitioners:String			=	"GetPractitionersEvent";
		public static const Event_DeletePractitioner:String			=	"DeletePractitionerEvent";
		public static const Event_UpdatePractitioner:String			=	"UpdatePractitionerEvent";
		public static const Event_GetPractitioner:String			=	"GetPractitionerEvent";	
		public static const Event_GetInventors:String				=	"GetInventorsEvent";
		public static const Event_GetInventor:String				=	"GetInventorEvent";
		public static const Event_UpdateInventor:String				=	"UpdateInventorEvent";
		public static const Event_DeleteInventor:String				=	"DeleteInventorEvent";
		/**
		 * manager
		 */
		public static const Event_GetClients:String					=	"GetClientsEvent";
		public static const Event_GetFirms:String					=	"GetFirmsEvent";
		public static const Event_DeleteClient:String				=	"DeleteClientEvent";
		public static const Event_DeleteFirm:String					=	"DeleteFirmEvent";
		public static const Event_UpdateClient:String				=	"UpdateClientEvent";
		public static const Event_UpdateFirms:String				=	"UpdateFirmsEvent";
		public static const Event_GetClient:String					=	"GetClientEvent";
		public static const Event_GetFirm:String					=	"GetFirmEvent";
		public static const Event_GetFirmsWork:String				=	"GetFirmsWorks";
		public static const Event_InviteeFirm:String				=	"InviteeFirmEvent";
		public static const Event_GetOrderFirms:String				=	"GetOrderFirmsEvent";
		
		/**
		 * 	invention
		 */
		public static const Event_AddAction:String					=	"AddActionEvent";
		public static const Event_GetInventions:String				=	"GetInventionsEvent";
		public static const Event_GetInvention:String				=	"GetInventionEvent";
		public static const Event_GetActions:String					=	"GetActionsEvent"; 
		public static const Event_AddInvention : String 			= 	"AddInventionEvent";
		
		public static const Event_RequestBid:String					=	"RequestBidEvent";
		public static const Event_PublishInvention:String			=	"PublishInventionEvent";
		public static const Event_UpdateInvention:String			=	"UpdateInventionEvent";
		public static const Event_GetBidInventions:String			=	"GetBidInventionsEvent";
		public static const Event_SetBudget:String					=	"SetBudgetEvent";
		public static const Event_GetInventionBudgets:String		=	"GetInventionBudgets";
		public static const Event_AssignToPractitioner:String		=	"AssignToPractitioner";
		public static const Event_SpecifyFillingDueDate:String		=	"SpecifyFillingDueDateEvent";
		public static const Event_SearchInventions:String			=	"SearchInventionsEvent";
		
		public static const Event_AddFieldAction:String				=	"AddFieldActionEvent";
		public static const Event_AddOfficeAction:String			=	"AddOfficeActionEvent";
		public static const Event_GetValue:String					=	"GetValueEvent";
		public static const Event_SetValue:String					=	"SetValueEvent";
		public static const Event_AssignToFirm:String				=	"AssignToFirm";
		public static const Event_AssignToFirmOther:String			=	"AssignToFirmOtherEvent";
		public static const Event_AcceptAssignInvention:String		=	"AcceptAssignInventionEvent";
		public static const Event_RenewalFee:String					=	"RenewalFeeEvent";
		public static const Event_ResponseToOffice:String			=	"ResponseToOfficeEvent";
		public static const Event_GetResponseActions:String			=	"GetResponseActionsEvent";
		public static const Event_ProtectAsSecret:String			=	"ProtectAsSecretEvent";
		public static const Event_SetMaxBudget:String				=	"SetMaxBudgetEvent";
		public static const Event_SaveFirmDocket:String				=	"SaveFirmDocketEvent";
		
		public static const Event_GetTrackInventions:String			=	"GetTrackInventionsEvent";
		public static const Event_GetTrackInventionsByFirm:String	=	"GetTrackInventionsByFirmEvent";
		public static const Event_RecordTradeMark:String			=	"RecordTradeMarkEvent";
		public static const Event_RecordTradeSecret:String			=	"RecordTradeSecretEvent";
		
		//public static const Event_GetTrades:String					=	"GetTradesEvent";
		
		public static const Event_GetTradeSecrets:String			=	"GetTradeSecretsEvent";
		/**
		 * firm
		 */
		public static const EVENT_ADDCUSTOMER : String 				= 	"AddCustomerEvent";
		/**
		 * trade mark
		 */
		public static const Event_GetTradeMarks:String				=	"GetTradeMarksEvent";
		public static const Event_GetBidTradeMarks:String			=	"GetBidTradeMarksEvent";
		public static const Event_GetTradeMark:String				=	"GetTradeMarkEvent";
		public static const Event_GetTradeMarkActions:String		=	"GetTradeMarkActionsEvent";
		public static const Event_AssignTradeMarkToFirm:String		=	"AssignTradeMarkToFirmEvent";
		public static const Event_AcceptAssignMark:String			=	"AcceptAssignMarkEvent";
		public static const Event_AddTradeMarkAction:String			=	"AddTradeMarkActionEvent";
		/**
		 * copyright
		 */
		public static const Event_GetCopyright:String				=	"GetCopyRightEvent";
		public static const Event_SetCopyright:String				=	"SetCopyRightEvent";
		public static const Event_GetCopyrights:String				=	"GetCopyrightEvent";
		public static const Event_GetBidCopyrights:String			=	"GetBidCopyrightsEvent";
		public static const Event_GetCopyrightActions:String		=	"GetCopyrightActionsEvent";
		public static const Event_AddCopyrightAction:String			=	"AddCopyrightActionEvent";
		public static const Event_AssignCopyrightToFirm:String		=	"AssignCopyRightToFirmEvent";
		public static const Event_AcceptAssignCopyright:String		=	"AcceptAssignCopyrightEvent";
		/**
		 * budget
		 */
		public static const Event_GetBudgets:String					=	"GetBudgetsEvent";
		public static const Event_ReturnCase:String			=	"ReturnCaseEvent";
		
		/**
		 * manager
		 */
		public static const Event_UpdateService:String		=	"UpdateServiceEvent";
	}
}